Component({
    data: {
        selected: 0,
        color: "#aaa8a9",
        selectedColor: "#376c7a",
        list: [{
            pagePath: "/pages/index/index",
            text: "首页"
        }, 
        {
            pagePath: "/pages/product/index/index",
            text: "产品中心"
        },
        {
            pagePath: "/pages/case/index/index",
            text: "落地项目"
        },
        {
            pagePath: "/pages/us/index",
            text: "联系我们"
        }]
    },
    attached() {},
    methods: {
        switchTab(e) {
            const data = e.currentTarget.dataset
            const url = data.path
            wx.switchTab({
                url,
            })
            this.setData({
                selected: data.index
            })
            console.log(this.data.selected)
        }
    }
})